import React from 'react'
import { Swiper } from "antd-mobile-v5"

type Props = {
  imgList: object[]
}

export default class SwiperCom extends React.Component<Props> {

  render() {
    const items = this.props.imgList.map((item:any) => (
      <Swiper.Item key={item.id}>
        <div
          className="content"
        >
          <img src={item.imgSrc} alt="" />
        </div>
      </Swiper.Item>
    ))
    // console.log(this.props)
    return (
      <Swiper autoplay loop>{items}</Swiper>
    )
  }
}
